import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Test from '../views/Test.vue'
import Course from '../views/Course.vue'
import Ht from '../views/Ht.vue'
import Cs from '../views/Cs.vue'
Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: HomeView
  },
  {
    path: '/course',
    component: Course,
    //二级路由
    children: [{
      path: '/html',
      component: Ht,
    }, {
      path: '/css',
      component: Cs,
    }]
  }
]

const router = new VueRouter({
  routes
})

export default router
